import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_app/2_advance/net/app_http.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';

import '2_advance/app.dart';


void main() {

  ///确保初始化完成
  WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
  FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
  // 设置状态栏背景
  SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
    statusBarColor: Colors.transparent, // 背景色
    statusBarIconBrightness: Brightness.dark, // 文字和icon颜色
  ));

  // 更多初始化工作
  AppHttp.init();
  runApp(App());

  FlutterNativeSplash.remove();
}
